<?php
/**
 *
 * @user: leo
 * @date: 2021/7/5
 * @createTime: 13:57
 * @company: 迈酷网络科技 http://www.maicooit.com
 */
namespace app\controller;

use app\BaseController;

class Response extends BaseController{

    public static function loginSuccJson($data,$userInfo,$code,$msg){
        $error = ["data"=>$data,"error"=>['code'=>$code,"msg"=>$msg],"userInfo"=>$userInfo];
        return $error;
    }

    public static function succJson($data,$code,$msg){
        $error = ["data"=>$data,"error"=>['code'=>$code,"msg"=>$msg]];
        return $error;
    }

    public static function errJson($data,$code,$msg){
        $error = ["data"=>$data,"error"=>['code'=>$code,"msg"=>$msg]];
        return $error;
    }

    public static function exceptionJson($code,$msg){
        $error = ["error"=>['code'=>$code,"msg"=>$msg]];
        return $error;
    }

}